//
//  UIViewController+XBBaseViewController.h
//  XBFrameworkProject
//
//  Created by 徐秀滨 on 2018/11/12.
//  Copyright © 2018 徐秀滨. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "NetworkViewModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface XBViewControllerParameter : NSObject

@property (nonatomic, assign) BOOL needBack;//是否需要返回

@end

@interface UIViewController (XBBaseViewController)

@property (nonatomic, strong) XBViewControllerParameter *parameter;
@property (nonatomic, strong) NetworkViewModel *networkVM;


- (void)networkRequest:(NSString*)url
            parameters:(id)parameters
                  type:(NetworkRequestType)requestType
          successBlock:(void(^)(void))successBlock
          failureBlock:(void(^)(void))failureBlock;

#pragma mark -HUD

- (void)showHudWithHint:(NSString *)hint;

- (void)showHintTip:(NSString *)hint;

- (void)hideHud;

#pragma mark - Action

- (void)pushViewContoller:(UIViewController*)vc animated:(BOOL)animated;

- (void)goBack;

@end

NS_ASSUME_NONNULL_END
